<?php
    $this->title = "Cadastro de usuários";
    $this->headTitle($this->title);
?>
<a class="linkBtn" href="<?php echo $this->url(array('module'=>'default','controller'=>'usuarios','action'=>'add'));?>">Adicionar novo usuário</a>
<a class="linkBtn" href="<?php echo $this->url(array('module'=>'default','controller'=>'index','action'=>'index'));?>">Voltar</a>
<table>
    <tr>
        <th>Servidor</th>
        <th>&nbsp;</th>
    </tr>
<?php
    $cont = 0;
    foreach($this->usuarios as $usuario) :
        $cont++;
        if($cont % 2 == 0)
            echo '<tr class="even">';
        else
            echo '<tr class="odd ">';
?>
        <td class="texto"><?php echo $usuario->nome;?></td>
        <td>
        <a href="<?php echo $this->url(array('controller'=>'usuarios','action'=>'edit', 'id'=>$usuario->id));?>">
        <img alt="Editar"  src="<?php echo $this->baseUrl().'/images/edit.png'; ?>"></a>
        <a href="<?php echo $this->url(array('controller'=>'usuarios','action'=>'delete', 'id'=>$usuario->id));?>">
        <img alt="Apagar"  src="<?php echo $this->baseUrl().'/images/trash.png'; ?>"></a>
        </td>
<?php echo "</tr>"; endforeach; ?>
</table>
